﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using BUS;

public partial class UserControl_ProByCate : System.Web.UI.UserControl
{
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
            LoadData();
    }

    private void LoadData()
    {
        lvProducts.DataSource = SanPhamBUS.GetAll();
        lvProducts.DataBind();
    }
    protected void DataPager1_PreRender(object sender, EventArgs e)
    {
        LoadData();
    }
}